import { defineStore } from "pinia";

import { getVideo } from "../utils/api";

interface State {
  videoSrc: string;
}

export const useVideoPlay = defineStore({
  id: "useVideoPlay",
  state: (): State => {
    return {
      videoSrc:''
    };
  },
  getters: {},
  actions: {
    actionVideoSrc(id:string){
      getVideo(id).then(res=>{
        this.videoSrc = res.data.url
      })
    }
  },
});
